package me.hl.common.codec;

import org.apache.commons.codec.binary.Base64;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Created by haoliang on 2016/7/29.
 */
public class Base64Test {
    private static Logger logger = LoggerFactory.getLogger(Base64Test.class);

    @Test
    public void base64Test() {
        String base64Planck = Base64.encodeBase64String("planck".getBytes());
        logger.info(base64Planck);
        logger.info(new String((Base64.decodeBase64(base64Planck))));
    }
}
